<?php
class CategoryController extends \BaseController {

	protected $layout = 'layout/default';
	
	/**
	 * Shows an individual category by its slug
	 */
	public function showProductsByCategorySlug($slug)
	{
		$category 	= Category::whereSlug($slug)->first();
		$categories = Category::all();
		$seo 		= $category->seo()->first();
	
		$this->layout->content = View::make('category.single', array(
			'category'	=> $category,
			'categories'=> $categories,
			'seo'		=> $seo
		));
	}
}